package indi.jp.project.core.service;

import indi.jp.project.core.entity.JsonResult;
import indi.jp.project.core.entity.Role;
import indi.jp.project.core.entity.RoleUser;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface RoleService {

    Map<String, Object> queryGrid(Role entity) throws SQLException;

    JsonResult save(Role entity) throws SQLException;

    int deleteById(String id) throws SQLException;

    Map<String, Object> queryRoleUserGrid(RoleUser entity) throws SQLException;

    JsonResult addRoleUser(RoleUser entity);

    JsonResult removeRoleUser(String id);

    List<Role> queryRolesByUsername(String username) throws SQLException;

}
